package com.extend;

// 父类（Pupil和Graduate的父类）
public class Student {
    // 共有属性
    private String name;
    private int age;
    private double score;

    // 共有方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    // 显示基本信息
    public void showInfo(){
        System.out.println("学生名 = " + this.name + "\t年龄 = " + this.age + "\t成绩 = " + this.score);
    }
}
